import Vue from 'vue'
import VueRouter from 'vue-router'
import CmsIndex from '../views/cms/index.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'CmsIndex',
    component: CmsIndex
  },
  {
    path: '/cmsadd',
    name: 'CmsAdd',
    component: () => import('../views/cms/add.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login.vue')
  },
  {
    path:'/myindex',
    name: 'myindex',
    component:() => import('../views/myindex/index.vue')
  },
  {
    path:'/detail',
    name:'detail',
    component:() => import('../views/cms/detail.vue')
  },
  {
    path:'/artDetail',
    name:'artDetail',
    component:() => import('../views/cms/artDetail.vue')
  },
  {
    path:'/houseindex',
    name:'houseindex',
    component:() =>import('../views/house/index.vue')
  },
  {
    path:'/hdetail',
    name:'hdetail',
    component:()=>import('../views/house/hdetail.vue')
  },
  {
    path:'/myCollect',
    name:'myCollect',
    component:()=>import('../views/myindex/myCollect.vue')
  },
  {
    path:'/address',
    name:'address',
    component:() => import('../views/test/index.vue')
  },
  {
    path:'/personList',
    name:'personList',
    component:() => import('../views/living/personList.vue')
  },
  {
    path:'/personDetail',
    name:'personDetail',
    component:() => import('../views/living/personDetail.vue')
  },
  {
    path:'/order',
    name:'order',
    component:() =>import('../views/order/index.vue')
  },
  {
    path:'/orderDetail',
    name:'orderDetail',
    component:() => import('../views/order/detail.vue')
  },
  {
    path:'/couponList',
    name:'couponList',
    component:() => import('../views/coupon/index.vue')
  },
  {
    path:'/userCoupon',
    name:'userCoupon',
    component:() => import('../views/coupon/userCoupon.vue')
  }

]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
